package com.liaogui;

import java.util.*;

/**
 * @author liaogui
 * @date 2025/3/26 17:55
 */
public class Test02 {

    public static void main(String[] args) {
        String name = "mike";
        Object name1 = name;
        sayHello(name);
        sayHello(name1);
        Map<String, String> books = new HashMap<>();
        books.put("bob", "books");
        books.put("c", "concurrent");
        books.put("a", "a lock");
        System.out.println(books);

        Map<String, String> books1 = new TreeMap<>();
        books1.put("bob", "books");
        books1.put("c", "concurrent");
        books1.put("a", "a lock");
        System.out.println(books1);

        HashSet<String> objects = new HashSet<>();
        objects.add(null);
        objects.add("b");
        objects.add("z");
        objects.add("c");
        objects.add("d");
        System.out.println(objects);

        TreeSet<Integer> treeSet = new TreeSet<>();
        treeSet.add(1);
        treeSet.add(3);
        treeSet.add(2);
        treeSet.add(2);
        System.out.println(treeSet);
    }

    public static void sayHello(String name) {
        System.out.println("Hello" + name);
    }

    public static void sayHello(final Object name) {
        System.out.println("Hello" + name);
    }
}
